/**
 * 
 */
package com.hst.web.sys.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import oracle.sql.TIMESTAMP;
import org.hibernate.annotations.GenericGenerator;

import com.hst.core.annotation.Comment;
import com.hst.core.annotation.HSID;
import com.hst.core.dao.BaseEntity;

/**
 * @author luwenjie
 *
 */
@Entity
@Table(name = "t_manager_info", indexes = { @Index(unique = true, columnList = "operator_nbr") })
@HSID(length = 10, prefix = "U", resetByDay = true)
@Comment("管理员用户(操作员)表")
public class TUser extends BaseEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@Column(length = 10)
	@GeneratedValue(generator = "hsid")
	@GenericGenerator(name = "hsid", strategy = "com.hst.core.hbm.HSIDGenerator")
	@Comment("ID")
	private String id;

	@Comment("操作员号/账号")
	@Column(length = 20,name="operator_nbr")
	private String operatorNbr;
	
	@Column(length = 32)
	@Comment("密码")
	private String password;

	@Column(length = 100)
	@Comment("登录名")
	private String loginName;
	
	@Column(length = 20,name="employee_code")
	@Comment("人员编号")
	private String employeeCode;
	
	@Column(length = 2,name="user_type") // 0-部门管理员,1-承包商管理员,2-企业管理员,9-公安管理员
	@Comment("用户类型")
	private String userType;
	
	@Column(length = 1)  //1：有效   2：注销
	@Comment("有效标识")
	private String validflag;
	
	@Column(length = 2,name="user_typeold") // 0-部门管理员,1-承包商管理员,2-企业管理员,9-公安管理员
	@Comment("用户类型(old)")
	private String userTypeOld;
	
	@Column(length = 1,name="appointment_flag")  //预约标识,0-禁止预约,1-允许预约(默认)
	@Comment("预约标识")
	private String appointmentFlag = "1";

	@Comment("修改时间")
	private Timestamp updateTime;

	@Override
	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getOperatorNbr() {
		return operatorNbr;
	}

	public void setOperatorNbr(String operatorNbr) {
		this.operatorNbr = operatorNbr;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getEmployeeCode() {
		return employeeCode;
	}

	public void setEmployeeCode(String employeeCode) {
		this.employeeCode = employeeCode;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String getValidflag() {
		return validflag;
	}

	public void setValidflag(String validflag) {
		this.validflag = validflag;
	}

	public String getUserTypeOld() {
		return userTypeOld;
	}

	public void setUserTypeOld(String userTypeOld) {
		this.userTypeOld = userTypeOld;
	}

	public String getAppointmentFlag() {
		return appointmentFlag;
	}

	public void setAppointmentFlag(String appointmentFlag) {
		this.appointmentFlag = appointmentFlag;
	}

}
